package io.fileCopy;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

public class FileCopy {
    public static void main(String[] args) throws Exception {
        FileInputStream fileInputStream = new FileInputStream("e:\\tu.png");
        FileOutputStream fileOutputStream = new FileOutputStream("f:\\重头来过\\javaio\\tu.png");

        byte[] bytes = new byte[1024];
        int len = 0;
        while ((len = fileInputStream.read(bytes)) != -1) {
            fileOutputStream.write(bytes, 0, len);
        }
        fileInputStream.close();
        fileOutputStream.close();
    }
}
